package org.dht.com.tra;

/**
 * The <code>ReturnsManager</code> interface have all services for waiting
 * results
 * 
 * @param <T>
 */
public interface ReturnsManager<T> {
	/**
	 * Creates a waiting result for sequence number and time out
	 * 
	 * @param sequence
	 *            Sequence number
	 * @param timeOut
	 *            Time out of waiting
	 * @return WaitingResult
	 */
	public WaitingResult<T> createWaitingResult(long sequence, long timeOut);

	/**
	 * Release waiting result by sequence number and response
	 * 
	 * @param sequence
	 *            Sequence number
	 * @param result
	 *            Response
	 */
	public void releaseWaitingResult(long sequence, T result);
}
